package com.tvein.system.view
{
	//flash
	import flash.text.TextField;
	import flash.ui.ContextMenu;
	//pureMVC
	import org.puremvc.as3.multicore.patterns.mediator.Mediator;
	import org.puremvc.as3.multicore.interfaces.IMediator;
	//custom
	import com.tvein.System;
//
    public class ApplicationMediator extends Mediator implements IMediator
    {
        public static const NAME:String = 'ApplicationMediator';
     
		public function ApplicationMediator(viewComponent:Object)
		{
			super(NAME, viewComponent);
		}
		
		public function get system() : System
		{
			return viewComponent as System;
		}
		
		//Custom
		private var _txtMsg:TextField = new TextField();
		
		override public function onRegister() : void
        {
			//屏蔽菜单
			var myContextMenu:ContextMenu = new ContextMenu();
			myContextMenu.hideBuiltInItems();
			system.contextMenu = myContextMenu;
			
			//显示状态
			_txtMsg.textColor = 0x898989;
			_txtMsg.width = 220;
			_txtMsg.y = 120;
			_txtMsg.selectable = false;
			_txtMsg.autoSize = "center";
			_txtMsg.text = "Copyright © 2012 Tvein. All rights reserved.";
			system.addChild(_txtMsg);
        }
    }
}